Reproducible computational environments using containers: Introduction to Singularity

This lesson provides an introduction to using the SingularityCE/Apptainer container platform. Singularity is particularly suited to running containers on infrastructure where users don’t have administrative privileges, for example shared infrastructure such as High Performance Computing (HPC) clusters.

This lesson will introduce Singularity from scratch showing you how to run a simple container and building up to creating your own containers and running parallel scientific workloads on HPC infrastructure.

Prerequisites

You should have basic familiarity with using a command shell, and the lesson text will at times request that you “open a shell window”, with an assumption that you know what this means. Under Linux or macOS it is assumed that you will access a bash shell (usually the default), using your Terminal application. Under Windows, Powershell or WSL should allow you to use the Unix instructions. The lessons will sometimes request that you use a text editor to create or edit files in particular directories. It is assumed that you either have an editor that you know how to use that runs within the working directory of your shell window (e.g. nano), or that if you use a graphical editor, that you can use it to read and write files into the working directory of your shell.

Course details

Schedule

Setup Download files required for the lesson
09:30 1. Introducing Containers What are containers, and why might they be useful to me?
09:50 2. Singularity: Getting started What is Singularity and why might I want to use it?
10:15 3. Using Singularity containers to run commands How do I run different commands within a container?
How do I access an interactive shell within a container?
10:30 4. Using Docker images with Singularity How do I use Docker images with Singularity?
10:45 5. Break Break
11:15 6. The Singularity cache Why does Singularity use a local cache?
Where does Singularity store images?
11:25 7. Files in Singularity containers How do I make data available in a Singularity container?
What data is made available by default in a Singularity container?
11:45 8. Creating Your Own Container Images How can I make my own Docker container images?
How do I document the ‘recipe’ for a Docker container image?
12:20 9. Lunch Break
13:20 10. Creating More Complex Container Images How can I make more complex container images?
13:55 11. Running MPI parallel jobs using Singularity containers How do I set up and run an MPI job from a Singularity container?
15:05 12. Break Break
15:35 13. Containers in Research Workflows: Reproducibility and Granularity How can I use container images to make my research more reproducible?
How do I incorporate containers into my research workflow?
16:00 14. Additional topics and next steps How do I understand more on how containers work?
What different container technologies are there and what are differences/implications?
How can I orchestrate different containers?
16:00 15. (Optional) Using Singularity to run BLAST+ How can I use Singularity to run bioinformatics workflows with BLAST+?
17:00 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.